package com.ruoyi.common.core.domain.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Transient;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author：liyouxin
 * @date：2023/8/20 14:29
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class RestaurantBalanceDetail extends BaseEntity {
	@ApiModelProperty(name = "id", value = "消费id")
	private Long id;
	@ApiModelProperty(name = "customerId", value = "客户id")
	@Excel(name = "用户编号", cellType = Excel.ColumnType.STRING)
	private Long customerId;
	@Transient
	@Excel(name = "用户昵称", cellType = Excel.ColumnType.STRING)
	private String customerName;
	private BigDecimal balance;
	@Excel(name = "消费金额", cellType = Excel.ColumnType.STRING)
	@ApiModelProperty(name = "amount", value = "消费金额")
	private BigDecimal amount;
	@ApiModelProperty(name = "location", value = "消费地址")
	@Excel(name = "园区", cellType = Excel.ColumnType.STRING)
	private String location;
	@ApiModelProperty(name = "type", value = "消费类型")
	@Excel(name = "消费类型", cellType = Excel.ColumnType.STRING)
	private String type;
	@ApiModelProperty(name = "reason", value = "消费来源")
	@Excel(name = "消费原因", cellType = Excel.ColumnType.STRING)
	private String reason;
	@JsonFormat(pattern = "yyyy-MM-dd")
	@Excel(name = "消费时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
	private Date createTime;

	private String appSource;

	//查询表字段
	private String startDate;
	private String endDate;

	private BigDecimal money;//余额
	private String userNickName;//当前登录人

	@JsonFormat(pattern = "yyyy-MM-dd")
	private Date today;
}
